Skip to content

Conversation

@simonLeary42
Copy link
Collaborator

No description provided.

This comment was marked as outdated.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR centralizes configuration management by introducing a global constant CONFIG that replaces the previous $CONFIG variable pattern throughout the codebase. The change simplifies configuration access and eliminates the need to pass configuration variables to class constructors.

  • Introduces a global CONFIG constant defined in a new config.php file
  • Updates all class constructors to remove configuration parameters and access config directly
  • Replaces all $CONFIG variable references with CONFIG constant references across templates and PHP files

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
resources/config.php New file defining the global CONFIG constant
resources/autoload.php Includes the new config.php file
resources/init.php Simplified object instantiation using global config
resources/lib/*.php Updated constructors to remove config parameters and access CONFIG directly
webroot/**/*.php Updated all CONFIG variable references to use the new constant
resources/templates/*.php Updated template files to use CONFIG constant
test/phpunit-bootstrap.php Removed CONFIG from global variable declarations in test functions
workers/update-ldap-cache.php Updated LDAP configuration access to use CONFIG constant

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@simonLeary42 simonLeary42 marked this pull request as ready for review September 10, 2025 15:58
@simonLeary42 simonLeary42 merged commit 4a459c5 into main Sep 10, 2025
2 checks passed
@simonLeary42 simonLeary42 deleted the global-config branch September 10, 2025 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants